package com.ys.service.eKnowAi.impl;

import com.ys.entity.eKnowAi.EKnowTemplateType;
import com.ys.mapper.eKnowAi.EKnowAiDiySqlMapper;
import com.ys.mapper.eKnowAi.EKnowTemplateTypeMapper;
import com.ys.service.eKnowAi.EKnowTemplateTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("eKnowTemplateTypeService")
public class EKnowTemplateTypeServiceImpl implements EKnowTemplateTypeService {

	@Autowired
	private EKnowTemplateTypeMapper eKnowTemplateTypeMapper;

	@Autowired
	private EKnowAiDiySqlMapper eKnowAiDiySqlMapper;


	@Override
	public int addEKnowTemplateType(EKnowTemplateType eKnowTemplateType) {
		eKnowTemplateType.setStatus(1);
		int result = eKnowTemplateTypeMapper.insert(eKnowTemplateType);
		return result;
	}


	@Override
	public int updateEKnowTemplateType(EKnowTemplateType eKnowTemplateType) {
		eKnowTemplateType.setStatus(1);
		int result = eKnowTemplateTypeMapper.update(eKnowTemplateType);
		return result;
	}

	@Override
	public int deleteEKnowTemplateType(long id) {
		int result = eKnowAiDiySqlMapper.deleteEKnowTemplateType(id);
		return result;
	}


}
